package com.bing.bean.weixin;

import com.bing.utils.StringDataAdapter;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 * Created by kaibb on 2014/12/6.
 */
@XmlAccessorType(XmlAccessType.FIELD)
public class Media {
    @XmlTransient
    private int id;

    @XmlJavaTypeAdapter(StringDataAdapter.class)
    @XmlElement(name = "MediaId")
    private String mediaId;

    @XmlJavaTypeAdapter(StringDataAdapter.class)
    @XmlElement(name = "Title")
    private String title;

    @XmlJavaTypeAdapter(StringDataAdapter.class)
    @XmlElement(name = "Description")
    private String description;

    @XmlJavaTypeAdapter(StringDataAdapter.class)
    @XmlElement(name = "MusicUrl")
    private String musicUrl;

    @XmlJavaTypeAdapter(StringDataAdapter.class)
    @XmlElement(name = "HQMusicUrl")
    private String hQMusicUrl;

    @XmlJavaTypeAdapter(StringDataAdapter.class)
    @XmlElement(name = "ThumbMediaId")
    private String thumbMediaId;
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getMusicUrl() {
        return musicUrl;
    }

    public void setMusicUrl(String musicUrl) {
        this.musicUrl = musicUrl;
    }

    public String gethQMusicUrl() {
        return hQMusicUrl;
    }

    public void sethQMusicUrl(String hQMusicUrl) {
        this.hQMusicUrl = hQMusicUrl;
    }

    public String getThumbMediaId() {
        return thumbMediaId;
    }

    public void setThumbMediaId(String thumbMediaId) {
        this.thumbMediaId = thumbMediaId;
    }

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Media{");
        sb.append("mediaId='").append(mediaId).append('\'');
        sb.append(", title='").append(title).append('\'');
        sb.append(", description='").append(description).append('\'');
        sb.append(", musicUrl='").append(musicUrl).append('\'');
        sb.append(", hQMusicUrl='").append(hQMusicUrl).append('\'');
        sb.append(", thumbMediaId='").append(thumbMediaId).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
